package com.ajmd.onlineexam.exception;

import com.ajmd.onlineexam.enumeration.CodeMsgEnum;
import lombok.Data;

/**
 * @author ajmd
 * @since 2023/3/8 20:47
 */
@Data
public class AppException extends Exception{
    private int code = 500;
    private String message = "服务器异常";

    public AppException(CodeMsgEnum codeMsgEnum){
        super();
        this.code=codeMsgEnum.getCode();
        this.message=codeMsgEnum.getMessage();
    }

    public AppException(Integer code,String message){
        super();
        this.code=code;
        this.message=message;
    }


}
